﻿@page "/install"
@layout EmptyLayout
@inherits BasePage

<InstallForm OnInstall="OnInstall">
    <TopMenu>
        <ul class="kui-menu">
            <li style="text-align:center;"><AntLanguage OnChanged="StateChanged" /></li>
            <li style="margin-left:15px;"><AntTheme Theme="@Context.Theme" OnChanged="SetTheme" /></li>
        </ul>
    </TopMenu>
</InstallForm>

@code {
    private void SetTheme(string theme)
    {
        if (!Config.App.IsTheme)
            return;

        Context.Theme = theme;
        StateChanged();
    }

    private void OnInstall(InstallInfo info)
    {
        App?.NavigateTo("/login");
    }
}